home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 January: Mac OS SDK / Dev.CD Jan 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / PInterfaces / DriverGestalt.p < prev    next >
Encoding:
Text File  |  1998-08-17  |  20.1 KB  |  486 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        DriverGestalt.p
  3.  
  4.      Contains:    Driver Gestalt interfaces
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1995-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. }
  17. {$IFC UNDEFINED UsingIncludes}
  18. {$SETC UsingIncludes := 0}
  19. {$ENDC}
  20.  
  21. {$IFC NOT UsingIncludes}
  22.  UNIT DriverGestalt;
  23.  INTERFACE
  24. {$ENDC}
  25.  
  26. {$IFC UNDEFINED __DRIVERGESTALT__}
  27. {$SETC __DRIVERGESTALT__ := 1}
  28.  
  29. {$I+}
  30. {$SETC DriverGestaltIncludes := UsingIncludes}
  31. {$SETC UsingIncludes := 1}
  32.  
  33. {$IFC UNDEFINED __MACTYPES__}
  34. {$I MacTypes.p}
  35. {$ENDC}
  36. {$IFC UNDEFINED __OSUTILS__}
  37. {$I OSUtils.p}
  38. {$ENDC}
  39. {$IFC UNDEFINED __SCSI__}
  40. {$I SCSI.p}
  41. {$ENDC}
  42.  
  43.  
  44. {$PUSH}
  45. {$ALIGN MAC68K}
  46. {$LibExport+}
  47.  
  48. {__________________________________________________________________________________}
  49. { The Driver Gestalt bit in the dCtlFlags }
  50.  
  51. CONST
  52.     kbDriverGestaltEnable        = 2;
  53.     kmDriverGestaltEnableMask    = $04;
  54.  
  55. {__________________________________________________________________________________}
  56. { Driver Gestalt related csCodes }
  57.     kDriverGestaltCode            = 43;                            {  various uses  }
  58.     kDriverConfigureCode        = 43;                            {  various uses  }
  59.     kdgLowPowerMode                = 70;                            {  Sets/Returns the current energy consumption level  }
  60.     kdgReturnDeviceID            = 120;                            {  returns SCSI DevID in csParam[0]  }
  61.     kdgGetCDDeviceInfo            = 121;                            {  returns CDDeviceCharacteristics in csParam[0]  }
  62.  
  63. {__________________________________________________________________________________}
  64. { Driver Gestalt selectors }
  65.     kdgVersion                    = 'vers';                        {  Version number of the driver in standard Apple format  }
  66.     kdgDeviceType                = 'devt';                        {  The type of device the driver is driving.  }
  67.     kdgInterface                = 'intf';                        {  The underlying interface that the driver is using (if any)  }
  68.     kdgSync                        = 'sync';                        {  True if driver only behaves synchronously.  }
  69.     kdgBoot                        = 'boot';                        {  value to place in PRAM for this drive (long)  }
  70.     kdgWide                        = 'wide';                        {  True if driver supports ioWPosOffset  }
  71.     kdgPurge                    = 'purg';                        {  Driver purge permission (True = purge; False = no purge)  }
  72.     kdgSupportsSwitching        = 'lpwr';                        {  True if driver supports power switching  }
  73.     kdgMin3VPower                = 'pmn3';                        {  Minimum 3.3V power consumption in microWatts  }
  74.     kdgMin5VPower                = 'pmn5';                        {  Minimum 5V power consumption in microWatts  }
  75.     kdgMax3VPower                = 'pmx3';                        {  Maximum 3.3V power consumption in microWatts  }
  76.     kdgMax5VPower                = 'pmx5';                        {  Maximum 5V power consumption in microWatts  }
  77.     kdgInHighPower                = 'psta';                        {  True if device is currently in high power mode  }
  78.     kdgSupportsPowerCtl            = 'psup';                        {  True if driver supports following five calls  }
  79.     kdgAPI                        = 'dAPI';                        {  API support for PC Exchange  }
  80.     kdgEject                    = 'ejec';                        {  Eject options for shutdown/restart (Shutdown Mgr)  }
  81.     kdgFlush                    = 'flus';                        {  Determine if disk driver supports flush and if it needs a flush  }
  82.     kdgVMOptions                = 'vmop';                        {  Disk drive's Virtual Memory options  }
  83.     kdgMediaInfo                = 'minf';                        {  return media specific information  }
  84.     kdgPhysDriveIconSuite        = 'dics';                        {  Return a pointer to a IconFamily ('icns') data structure for  }
  85.                                                                 {  Disk Driver physical drive (formerly in csCode 22) in driverGestaltResponse.  }
  86.     kdgMediaIconSuite            = 'mics';                        {  Return a pointer to a IconFamily ('icns') data structure for  }
  87.                                                                 {  Disk Driver media (formerly in csCode 21) in driverGestaltResponse.  }
  88.                                                                 {  See IconServices.r for information detailing the 'icns' resource data format  }
  89.     kdgMediaName                = 'mnam';                        {  Return a pointer to a pascal string describing the Disk Driver (formerly in csCode 21) in driverGestaltResponse.  }
  90.  
  91. {__________________________________________________________________________________}
  92. { Driver Configure selectors }
  93.     kdcFlush                    = 'flus';                        {  Tell a disk driver to flush its cache and any hardware caches  }
  94.     kdcVMOptions                = 'vmop';                        {  Change the disk driver's Virtual Memory options  }
  95.  
  96. {__________________________________________________________________________________}
  97. { control parameter block for Driver Configure calls }
  98.  
  99. TYPE
  100.     DriverConfigParamPtr = ^DriverConfigParam;
  101.     DriverConfigParam = RECORD
  102.         qLink:                    QElemPtr;
  103.         qType:                    INTEGER;
  104.         ioTrap:                    INTEGER;
  105.         ioCmdAddr:                Ptr;
  106.         ioCompletion:            ProcPtr;
  107.         ioResult:                OSErr;
  108.         ioNamePtr:                StringPtr;
  109.         ioVRefNum:                INTEGER;
  110.         ioCRefNum:                INTEGER;                                {  refNum for I/O operation  }
  111.         csCode:                    INTEGER;                                {  == kDriverConfigureCode  }
  112.         driverConfigureSelector: OSType;
  113.         driverConfigureParameter: UInt32;
  114.     END;
  115.  
  116. {__________________________________________________________________________________}
  117. { status parameter block for Driver Gestalt calls }
  118.     DriverGestaltParamPtr = ^DriverGestaltParam;
  119.     DriverGestaltParam = RECORD
  120.         qLink:                    QElemPtr;
  121.         qType:                    INTEGER;
  122.         ioTrap:                    INTEGER;
  123.         ioCmdAddr:                Ptr;
  124.         ioCompletion:            ProcPtr;
  125.         ioResult:                OSErr;
  126.         ioNamePtr:                StringPtr;
  127.         ioVRefNum:                INTEGER;
  128.         ioCRefNum:                INTEGER;                                {  refNum for I/O operation  }
  129.         csCode:                    INTEGER;                                {     == kDriverGestaltCode  }
  130.         driverGestaltSelector:    OSType;                                    {  'sync', 'vers', etc.  }
  131.         driverGestaltResponse:    UInt32;                                    {  Could be a pointer, bit field or other format  }
  132.         driverGestaltResponse1:    UInt32;                                    {  Could be a pointer, bit field or other format  }
  133.         driverGestaltResponse2:    UInt32;                                    {  Could be a pointer, bit field or other format  }
  134.         driverGestaltResponse3:    UInt32;                                    {  Could be a pointer, bit field or other format  }
  135.         driverGestaltfiller:    UInt16;                                    {  To pad out to the size of a controlPB  }
  136.     END;
  137.  
  138. { Note that the various response definitions are overlays of the response fields above.
  139.    For instance the deviceType response would be returned in driverGestaltResponse.
  140.    The DriverGestaltPurgeResponse would be in driverGestaltResponse and driverGestaltResponse1
  141. }
  142. {__________________________________________________________________________________}
  143. { Device Types response }
  144.     DriverGestaltDevTResponsePtr = ^DriverGestaltDevTResponse;
  145.     DriverGestaltDevTResponse = RECORD
  146.         deviceType:                OSType;
  147.     END;
  148.  
  149.  
  150. CONST
  151.     kdgDiskType                    = 'disk';                        {  standard r/w disk drive  }
  152.     kdgTapeType                    = 'tape';                        {  tape drive  }
  153.     kdgPrinterType                = 'prnt';                        {  printer  }
  154.     kdgProcessorType            = 'proc';                        {  processor  }
  155.     kdgWormType                    = 'worm';                        {  write-once  }
  156.     kdgCDType                    = 'cdrm';                        {  cd-rom drive  }
  157.     kdgFloppyType                = 'flop';                        {  floppy disk drive  }
  158.     kdgScannerType                = 'scan';                        {  scanner  }
  159.     kdgFileType                    = 'file';                        {  Logical Partition type based on a file (Drive Container)  }
  160.     kdgRemovableType            = 'rdsk';                        {  A removable media hard disk drive ie. Syquest, Bernioulli  }
  161.  
  162. {__________________________________________________________________________________}
  163. { Device Interfaces response }
  164.  
  165. TYPE
  166.     DriverGestaltIntfResponsePtr = ^DriverGestaltIntfResponse;
  167.     DriverGestaltIntfResponse = RECORD
  168.         interfaceType:            OSType;
  169.     END;
  170.  
  171.  
  172. CONST
  173.     kdgScsiIntf                    = 'scsi';
  174.     kdgPcmciaIntf                = 'pcmc';
  175.     kdgATAIntf                    = 'ata ';
  176.     kdgFireWireIntf                = 'fire';
  177.     kdgExtBus                    = 'card';
  178.  
  179. {__________________________________________________________________________________}
  180. { Power Saving }
  181.  
  182. TYPE
  183.     DriverGestaltPowerResponsePtr = ^DriverGestaltPowerResponse;
  184.     DriverGestaltPowerResponse = RECORD
  185.         powerValue:                UInt32;                                    {  Power consumed in µWatts  }
  186.     END;
  187.  
  188. {__________________________________________________________________________________}
  189. { Disk Specific }
  190.     DriverGestaltSyncResponsePtr = ^DriverGestaltSyncResponse;
  191.     DriverGestaltSyncResponse = RECORD
  192.         behavesSynchronously:    BOOLEAN;
  193.         pad:                    PACKED ARRAY [0..2] OF UInt8;
  194.     END;
  195.  
  196.     DriverGestaltBootResponsePtr = ^DriverGestaltBootResponse;
  197.     DriverGestaltBootResponse = RECORD
  198.         extDev:                    SInt8;                                    {   Packed target (upper 5 bits) LUN (lower 3 bits)  }
  199.         partition:                SInt8;                                    {   Unused  }
  200.         SIMSlot:                SInt8;                                    {   Slot  }
  201.         SIMsRSRC:                SInt8;                                    {   sRsrcID  }
  202.     END;
  203.  
  204.     DriverGestaltAPIResponsePtr = ^DriverGestaltAPIResponse;
  205.     DriverGestaltAPIResponse = RECORD
  206.         partitionCmds:            INTEGER;                                {  if bit 0 is nonzero, supports partition control and status calls  }
  207.                                                                         {          prohibitMounting (control, kProhibitMounting)  }
  208.                                                                         {          partitionToVRef (status, kGetPartitionStatus)  }
  209.                                                                         {          getPartitionInfo (status, kGetPartInfo)  }
  210.         unused1:                INTEGER;                                {  all the unused fields should be zero  }
  211.         unused2:                INTEGER;
  212.         unused3:                INTEGER;
  213.         unused4:                INTEGER;
  214.         unused5:                INTEGER;
  215.         unused6:                INTEGER;
  216.         unused7:                INTEGER;
  217.         unused8:                INTEGER;
  218.         unused9:                INTEGER;
  219.         unused10:                INTEGER;
  220.     END;
  221.  
  222.     DriverGestaltFlushResponsePtr = ^DriverGestaltFlushResponse;
  223.     DriverGestaltFlushResponse = RECORD
  224.         canFlush:                BOOLEAN;                                {  Return true if driver supports the  }
  225.                                                                         {  kdcFlush Driver Configure _Control call  }
  226.         needsFlush:                BOOLEAN;                                {  Return true if driver/device has data cached  }
  227.                                                                         {  and needs to be flushed when the disk volume  }
  228.                                                                         {  is flushed by the File Manager  }
  229.         pad:                    PACKED ARRAY [0..1] OF UInt8;
  230.     END;
  231.  
  232. { Flags for purge permissions }
  233.  
  234. CONST
  235.     kbCloseOk                    = 0;                            {  Ok to call Close  }
  236.     kbRemoveOk                    = 1;                            {  Ok to call RemoveDrvr  }
  237.     kbPurgeOk                    = 2;                            {  Ok to call DisposePtr  }
  238.     kmNoCloseNoPurge            = 0;
  239.     kmOkCloseNoPurge            = $03;
  240.     kmOkCloseOkPurge            = $07;
  241.  
  242. { Driver purge permission structure }
  243.  
  244. TYPE
  245.     DriverGestaltPurgeResponsePtr = ^DriverGestaltPurgeResponse;
  246.     DriverGestaltPurgeResponse = RECORD
  247.         purgePermission:        UInt16;                                    {  0 = Do not change the state of the driver  }
  248.                                                                         {  3 = Do Close() and DrvrRemove() this driver  }
  249.                                                                         {  but don't deallocate driver code  }
  250.                                                                         {  7 = Do Close(), DrvrRemove(), and DisposePtr()  }
  251.         purgeReserved:            UInt16;
  252.         purgeDriverPointer:        Ptr;                                    {  pointer to the start of the driver block (valid  }
  253.                                                                         {  only of DisposePtr permission is given  }
  254.     END;
  255.  
  256.     DriverGestaltEjectResponsePtr = ^DriverGestaltEjectResponse;
  257.     DriverGestaltEjectResponse = RECORD
  258.         ejectFeatures:            UInt32;                                    {    }
  259.     END;
  260.  
  261. { Flags for Ejection Features field }
  262.  
  263. CONST
  264.     kRestartDontEject            = 0;                            {  Dont Want eject during Restart  }
  265.     kShutDownDontEject            = 1;                            {  Dont Want eject during Shutdown  }
  266.     kRestartDontEject_Mask        = $01;
  267.     kShutDownDontEject_Mask        = $02;
  268.  
  269. {
  270.     The DriverGestaltVMOptionsResponse is returned by a disk driver in response to a
  271.     kdgVMOptions Driver Gestalt request. This allows a disk driver to tell VM a few
  272.     things about a disk drive. For example:
  273.     
  274.     • A drive that should never be in the page fault path should return kAllowVMNoneMask.
  275.       Examples of this are drives that have manual eject buttons that are not disabled by
  276.       software, drives with very slow throughput, or drives that depend on
  277.       a network connection.
  278.     • A drive that should never be written to but is safe for read-only file mapping
  279.       should return kAllowVMReadOnlyMask. Examples of this are WORM drives where each write
  280.       eats write-once space on the disk and CD-ROM drives which are read-only media.
  281.     • A drive that should allow VM to create its main backing store file should return
  282.       kAllowVMReadWriteMask. Examples of this are fast read/write drives that don't allow
  283.       manual eject and don't use a network connection.
  284.     
  285.     A disk driver must look at the ioVRefNum field of the DriverGestaltParam to determine
  286.     what disk drive this call is for. This is a per-drive call, not a per-driver call.
  287.     
  288.     The only three valid responses to kdgVMOptions at this time are kAllowVMNoneMask,
  289.     kAllowVMReadOnlyMask, and kAllowVMReadWriteMask (i.e., setting only kAllowVMWriteBit
  290.     is not valid).
  291.     
  292.     Important: All bits not defined here are reserved and should be set to zero until
  293.     they are defined for a specific purpose.
  294.     
  295.     The kdcVMOptions Driver Configure _Control call provides the ability to change a driver's
  296.     response to kdgVMOptions Driver Gestalt requests. A driver should return controlErr if
  297.     it doesn't want to provide the ability to change the kdgVMOptions response. If a driver
  298.     supports the kdcVMOptions Driver Configure _Control call, but is asked to set an option bit
  299.     that it doesn't support (for example, if a read-only device is asked to set the kAllowVMWriteBit),
  300.     it should return paramErr.
  301. }
  302.  
  303. TYPE
  304.     DriverGestaltVMOptionsResponsePtr = ^DriverGestaltVMOptionsResponse;
  305.     DriverGestaltVMOptionsResponse = RECORD
  306.         vmOptions:                UInt32;
  307.     END;
  308.  
  309. { Bits and masks for DriverGestaltVMOptionsResponse.vmOptions field }
  310.  
  311. CONST
  312.     kAllowVMReadBit                = 0;                            {  Allow VM to use this drive for read access  }
  313.     kAllowVMWriteBit            = 1;                            {  Allow VM to use this drive for write access  }
  314.     kAllowVMNoneMask            = 0;
  315.     kAllowVMReadOnlyMask        = $01;
  316.     kAllowVMReadWriteMask        = $03;
  317.  
  318. {
  319.     The DriverGestaltMediaInfoResponse is returned by a disk driver in response to a
  320.     kdgMediaInfo DriverGestalt request. This allows a disk driver to tell callers the
  321.     physical block size, the number of blocks that are of that size, and the media type
  322.     for a given device.
  323.     
  324.     A disk driver must look at the ioVRefNum field of the DriverGestaltParam to determine
  325.     what disk drive this call is for. This is a per-drive call, not a per-driver call.
  326.     
  327.     On drives that support ejectable media, the response can change depending on what
  328.     media is currently in the drive.
  329. }
  330.  
  331. TYPE
  332.     DriverGestaltMediaInfoResponsePtr = ^DriverGestaltMediaInfoResponse;
  333.     DriverGestaltMediaInfoResponse = RECORD
  334.         numberBlocks:            UInt32;                                    {  number of blocks  }
  335.         blockSize:                UInt32;                                    {  physical size of blocks  }
  336.         mediaType:                SInt16;                                    {  media type identifier  }
  337.     END;
  338.  
  339. { DriverGestaltMediaInfoResponse.mediaType constants }
  340.  
  341. CONST
  342.     kMediaTypeUnknown            = 128;                            {  media type is unknown  }
  343.     kMediaTypeCDROM                = 129;                            {  media type is a CD-ROM  }
  344.     kMediaTypeDVDROM            = 130;                            {  media type is a DVD-ROM  }
  345.     kMediaTypeNoMedia            = -1;                            {  no media is present  }
  346.  
  347. {__________________________________________________________________________________}
  348. { CD-ROM Specific }
  349. { The CDDeviceCharacteristics result is returned in csParam[0] and csParam[1] of a 
  350.    standard CntrlParam parameter block called with csCode kdgGetCDDeviceInfo.
  351. }
  352.  
  353. TYPE
  354.     CDDeviceCharacteristicsPtr = ^CDDeviceCharacteristics;
  355.     CDDeviceCharacteristics = RECORD
  356.         speedMajor:                SInt8;                                    {  High byte of fixed point number containing drive speed  }
  357.         speedMinor:                SInt8;                                    {  Low byte of "" CD 300 == 2.2, CD_SC == 1.0 etc.  }
  358.         cdFeatures:                UInt16;                                    {  Flags field for features and transport type of this CD-ROM  }
  359.     END;
  360.  
  361.  
  362. CONST
  363.     cdFeatureFlagsMask            = $FFFC;                        {  The Flags are in the first 14 bits of the cdFeatures field  }
  364.     cdTransportMask                = $0003;                        {  The transport type is in the last 2 bits of the cdFeatures field  }
  365.  
  366.  
  367. { Flags for CD Features field }
  368.     cdMute                        = 0;                            {  The following flags have the same bit number  }
  369.     cdLeftToChannel                = 1;                            {  as the Audio Mode they represent.  Don't change  }
  370.     cdRightToChannel            = 2;                            {  them without changing dControl.c  }
  371.     cdLeftPlusRight                = 3;                            {  Reserve some space for new audio mixing features (4-7)  }
  372.     cdSCSI_2                    = 8;                            {  Supports SCSI2 CD Command Set  }
  373.     cdStereoVolume                = 9;                            {  Can support two different volumes (1 on each channel)  }
  374.     cdDisconnect                = 10;                            {  Drive supports disconnect/reconnect  }
  375.     cdWriteOnce                    = 11;                            {  Drive is a write/once (CD-R?) type drive  }
  376.     cdMute_Mask                    = $01;
  377.     cdLeftToChannel_Mask        = $02;
  378.     cdRightToChannel_Mask        = $04;
  379.     cdLeftPlusRight_Mask        = $08;
  380.     cdSCSI_2_Mask                = $0100;
  381.     cdStereoVolume_Mask            = $0200;
  382.     cdDisconnect_Mask            = $0400;
  383.     cdWriteOnce_Mask            = $0800;
  384.  
  385. { Transport types }
  386.     cdCaddy                        = 0;                            {  CD_SC,CD_SC_PLUS,CD-300 etc.  }
  387.     cdTray                        = 1;                            {  CD_300_PLUS etc.  }
  388.     cdLid                        = 2;                            {  Power CD - eg no eject mechanism  }
  389.  
  390. {  the following are used by PC Exchange (and Apple DOS/PC Compatibility Card) }
  391.  
  392. {  Control Codes }
  393.     kRegisterPartition            = 50;                            {  PCX needs a new Drive (for a non-macintosh partition found on the disk) }
  394.     OLD_REGISTER_PARTITION        = 301;                            {  left in for compatibility with shipping Apple DOS/PC Compatibility Card }
  395.     THE_DRIVE                    = 0;                            {  DrvQElPtr for the partition to register }
  396.     THE_PHYS_START                = 1;                            {  The start of the partition in logical blocks }
  397.     THE_PHYS_SIZE                = 2;                            {  The size of the partition in logical blocks }
  398.     kGetADrive                    = 51;                            {  control call to ask the driver to create a drive }
  399.     OLD_GET_A_DRIVE                = 302;                            {  left in for compatibility with shipping Apple DOS/PC Compatibility Card }
  400.     THE_VAR_QUEL                = 0;                            {  a VAR parameter for the returned DrvQElPtr }
  401.     kProhibitMounting            = 52;                            {  Dont allow mounting of the following drives }
  402.     kOldProhibitMounting        = 2100;                            {  left in for compatibility with shipping Apple DOS/PC Compatibility Card }
  403.     kProhibitDevice                = 0;                            {  CS Param 0 and 1 (partInfoRecPtr) }
  404.     kIsContainerMounted            = 53;
  405.     kOldIsContainerMounted        = 2201;                            {  left in for compatibility with shipping Apple DOS/PC Compatibility Card             }
  406.     kContainerVRef                = 0;                            {  CS Param 0 and 1 (VRefNum) }
  407.     kContainerParID                = 1;                            {  CS Param 2 and 3 (Parent ID) }
  408.     kContainerName                = 2;                            {  CS Param 4 and 5 (File Name) }
  409.     kContainerResponse            = 3;                            {  CS Param 6 and 7 (VAR pointer to short result) }
  410.     kMountVolumeImg                = 54;
  411.     OLD_MOUNT_VOLUME_IMG        = 2000;
  412.     MV_HOST_VREFNUM                = 0;
  413.     MV_HOST_PAR_ID                = 1;
  414.     MV_HOST_NAME                = 2;
  415.     MV_REQ_PERM                    = 3;
  416.  
  417. {  Status Codes }
  418.  
  419.     kGetPartitionStatus            = 50;                            {  what is the status of this partition? }
  420.     kOldGetPartitionStatus        = 2200;                            {  left in for compatibility with shipping Apple DOS/PC Compatibility Card }
  421.     kDeviceToQuery                = 0;                            {  CS Param 0 and 1 (partInfoRecPtr) }
  422.     kDeviceResponse                = 1;                            {  CS Param 2 and 3 (VAR pointer to short result) }
  423.     kGetPartInfo                = 51;                            {  Get a partition info record based on the provided vrefnum }
  424.     kOldGetPartInfo                = 2300;                            {  left in for compatibility with shipping Apple DOS/PC Compatibility Card }
  425.     kPartInfoResponse            = 0;                            {  var parameter (pointer to partInfoRec) CSParam [0-1] }
  426.     kGetContainerAlias            = 52;                            {  Get the alias that describes the file this drive was mounted from. }
  427.     kOldGetContainerAlias        = 2400;                            {  left in for compatibility with shipping Apple DOS/PC Compatibility Card }
  428.     kGetAliasResponse            = 0;                            {     var parameter (pointer to a Handle) CSParam [0-1] }
  429.  
  430. {  the result codes to come from the driver interface  }
  431.  
  432.     DRIVER_NOT_INSTALLED        = -1;
  433.     DRIVER_BUSY                    = -2;
  434.     CANT_MOUNT_WITHIN_THIS_FS    = -3;                            {  can only mount container within residing on HFS volume }
  435.     VOLUME_ALREADY_MOUNTED        = -4;                            {  Already Mounted }
  436.  
  437. {  requisite structures for PCX control and status calls }
  438.  
  439.     kMaxProhibted                = 2;                            {  the max number of volumes the PC can possibly have mounted }
  440.  
  441. {  GestaltSelector for Finding Driver information }
  442.  
  443.     kGetDriverInfo                = 'vdrc';
  444.  
  445.     VerifyCmd                    = 5;
  446.     FormatCmd                    = 6;
  447.     EjectCmd                    = 7;
  448.  
  449. {  Partition information passed back and forth between PCX and the driver }
  450.  
  451. TYPE
  452.     partInfoRecPtr = ^partInfoRec;
  453.     partInfoRec = RECORD
  454.         SCSIID:                    DeviceIdent;                            {  DeviceIdent for the device }
  455.         physPartitionLoc:        UInt32;                                    {  physical block number of beginning of partition }
  456.         partitionNumber:        UInt32;                                    {  the partition number of this partition }
  457.     END;
  458.  
  459.     vPartInfoRecPtr = ^vPartInfoRec;
  460.     vPartInfoRec = RECORD
  461.         VPRTVers:                SInt8;                                    {  Virtual partition version number }
  462.         VPRTType:                SInt8;                                    {  virtual partition type (DOS, HFS, etc) }
  463.         drvrRefNum:                SInt16;                                    {  Driver Reference number of partition driver }
  464.     END;
  465.  
  466. {  Information related to DOS partitions }
  467.  
  468. CONST
  469.     kDOSSigLow                    = $01FE;                        {  offset into boot block for DOS signature }
  470.     kDOSSigHi                    = $01FF;                        {  offset into boot block for DOS signature }
  471.     kDOSSigValLo                = $55;                            {  DOS signature value in low byte }
  472.     kDOSSigValHi                = $AA;                            {  DOS signature value in high byte }
  473.  
  474.  
  475.  
  476. {$ALIGN RESET}
  477. {$POP}
  478.  
  479. {$SETC UsingIncludes := DriverGestaltIncludes}
  480.  
  481. {$ENDC} {__DRIVERGESTALT__}
  482.  
  483. {$IFC NOT UsingIncludes}
  484.  END.
  485. {$ENDC}
  486.